<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<style>
    div { color: black; }
</style>
<div id="t">
    <div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
    </div>
</div>
<script>
if (window.testRunner)
    testRunner.dumpAsText();

description("Check that we don't do unnecessary style recalcs for inheritance.");

if (window.internals)
    internals.updateStyleAndReturnAffectedElementCount();

document.getElementById("t").style.color = "pink";

if (window.internals)
    shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
</script>
